<template>
<!--
  - Copyright (C) 2018-2019
  - All rights reserved, Designed By www.joolun.com
  - 注意：
  - 本软件为www.joolun.com开发研制，项目使用请保留此说明
-->
<view :class="'text-'+(size)+' text-red'">
  <text :class="'cuIcon-like'+(valueClone > index ? 'fill' : '')+' margin-right'"  @tap="redeHander" :data-index="index" v-for="(item,index) in (5)" :key="index"></text>
</view>
</template>

<script>
/**
 * Copyright (C) 2018-2019
 * All rights reserved, Designed By www.joolun.com
 * 注意：
 * 本软件为www.joolun.com开发研制，项目使用请保留此说明
 */
export default {
                    data() {
return {};
}, 
props: {
  value: {
    type: Number,
    default: 0
  },
  size: {
    type: String,
    default: 'xxl'
  }
}, 
methods: {
  redeHander(e) {
    let value = e.currentTarget.dataset.index + 1;
    this.setData({
      valueClone: value
    });
    this.$emit('onChange', {
      detail: value
    });
  }

},
                    watch:{
                      value: {
                        handler: function(newVal, oldVal) {
                          this.valueClone = newVal;
                        },

                        immediate: true
                      }
                    }
                };
</script>
<style >


</style>